/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.resource.service;

import org.springblade.modules.resource.entity.Attach;
import org.springblade.modules.resource.vo.AttachVO;
import org.springblade.core.mp.base.BaseService;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;

/**
 * 附件表 服务类
 *
 * @author Chill
 */
public interface IAttachService extends BaseService<Attach> {
	// 单级图纸下载
	List<Attach> getSingleAttachByInfoId(List<Long> infoIdList);


	List<Attach> getAttachByInfoId(Long infoId);

	List<AttachVO> getImgListByUploadId(Long uploadId);

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param attach
	 * @return
	 */
	IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach);

	List<AttachVO> getAllAttachListById(Long uploadId);


	/**
	 * 查询pdf\dwg、excel
	 * @param uploadId
	 * @return
	 */
	List<AttachVO> getDrawingByUploadId(Long uploadId);

	/**
	 * 三维图纸
	 * @param uploadId
	 * @return
	 */

	List<AttachVO> getThreeDrawingByUploadId(Long uploadId);

	List<AttachVO> getDeleteAttach(Long uploadId,List<String> fileName);

	List<AttachVO> getDeleteThreeAttach(Long uploadId,List<String> threeFileName);

	List<AttachVO> getBomExcelByUploadId(Long uploadId);

	AttachVO getAttachByUploadIdAndDrawingNumber(Long uploadId, String drawingNumber);

	List<AttachVO> getChildAttachList(Long uploadId, String drawingNumber);


	List<AttachVO> findDrawingListByUploadId(Long uploadId, String taskDefinitionKey);

	List<AttachVO> findAllUploadId(Long uploadId);

	/**
	 * 物理删除附件列表
	 * @param attachIdList
	 */
	Boolean deleteAttachByIds(List<Long> attachIdList);

	/**
	 * 批量修改附件归档状态
	 * @param attachIdList
	 * @param statusCode
	 * @return
	 */
	Boolean uploadAttachStatus(List<Long> attachIdList, Integer statusCode);

	/**
	 * 获取附件详情
	 * @param drawingInfoId
	 * @return
	 */
	Attach getAttachByDrawingInfoId(Long drawingInfoId);
}
